" Options
set adblocker=update
set closablepinnedtabs
set downloadmethod=confirm
set noincsearch
set mintabwidth=250
set redirecttohttp
set restoretabs=pinned
set searchwords=
set searchwords+=google~https://www.google.com/search?q=%s
set searchwords+="googlelucky~https://www.google.com/search?btnI=I'm+Feeling+Lucky&q=%s"
set searchwords+=scholar~https://scholar.google.com/scholar?q=%s
set searchwords+=googleuk~https://www.google.co.uk/search?q=%s
set searchwords+=bing~https://www.bing.com/search?q=%s
set searchwords+=duckduckgo~https://duckduckgo.com/?q=%s
set searchwords+=yahoo~https://search.yahoo.com/search?p=%s
set searchwords+=twitter~https://twitter.com/search?q=%s
set searchwords+=wikipedia~https://en.wikipedia.org/wiki/Special:Search/%s
set searchwords+=youtube~https://www.youtube.com/results?search_query=%s
set searchwords+=amazon~https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias=aps&field-keywords=%s
set searchwords+=amazonuk~https://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias=aps&field-keywords=%s
set searchwords+=startpage~https://startpage.com/do/search?language=english&cat=web&query=%s
set searchwords+=github~https://github.com/search?utf8=✓&q=%s
set searchwords+=searx~https://searx.me/?category_general=on&q=%s
set searchwords+=cnrtl~http://www.cnrtl.fr/lexicographie/%s
set searchwords+=osm~https://www.openstreetmap.org/search?query=%s
set searchwords+=mdn~https://developer.mozilla.org/en-US/search?q=%s
set searchwords+=gentoo_wiki~https://wiki.gentoo.org/index.php?title=Special:Search&profile=default&fulltext=Search&search=%s
set searchwords+=qwant~https://www.qwant.com/?q=%s
set noshowcmd
set tabreopenposition=previous
set useragent=%firefox

" Custom Commands
command! fillcmdline_open <toExploreMode>
command! fillcmdline_tab <toCommandMode>buffer<Space>
command! tabfirst <:buffer 0>
command! tablast <:buffer -1>
command! tabprev <previousTab>
command! tabnext <nextTab>
command! tabmove_+1 <moveTabForward>
command! tabmove_-1 <moveTabBackward>
command! current_url_open <toExploreMode><End>
command! tabclosealltoleft <:lclose>
command! tabclosealltoright <:rclose>
command! stop <stopLoadingPage>
command! urlincrement_-1 <decreasePageNumber>
command! urlincrement_1 <increasePageNumber>
command! followpage_prev <previousPage>
command! followpage_next <nextPage>
command! zoom_1 <zoomReset>
command! zoom_0.1_true <zoomIn>
command! zoom_-0.1_true <zoomOut>
command! zoom_0.5_true 5<zoomIn>
command! zoom_-0.5_true 5<zoomOut>
command! zoom_0.5_true 5<zoomIn>
command! zoom_-0.5_true 5<zoomOut>
command! zoom_3 7<zoomIn>
command! zoom_0.3 7<zoomOut>

" Mappings
nmap o <:fillcmdline_open>
nmap b <:fillcmdline_tab>
nmap g0 <:tabfirst>
nmap g^ <:tabfirst>
nmap g$ <:tablast>
nmap J <:tabprev>
nmap K <:tabnext>
nmap >> <:tabmove_+1>
nmap <lt><lt> <:tabmove_-1>
nmap O <:current_url_open>
nmap gx0 <:tabclosealltoleft>
nmap gx$ <:tabclosealltoright>
nmap x <:stop>
nunmap [
nunmap ]
nmap [[ <:followpage_prev>
nmap ]] <:followpage_next>
nmap [c <:urlincrement_-1>
nmap ]c <:urlincrement_1>
nmap zz <:zoom_1>
nmap zi <:zoom_0.1_true>
nmap zo <:zoom_-0.1_true>
nmap zm <:zoom_0.5_true>
nmap zr <:zoom_-0.5_true>
nmap zM <:zoom_0.5_true>
nmap zR <:zoom_-0.5_true>
nmap zI <:zoom_3>
nmap zO <:zoom_0.3>
" Tridactyl easter egg
nmap <A-S-Up><A-S-Up><A-S-Down><A-S-Down><A-S-Left><A-S-Right><A-S-Left><A-S-Right>ba <:open https://www.youtube.com/watch?v=M3iOROuTuMA>

" vim: ft=vim
